package com.hmall.order.utils;

/**
 * 线程工具类
 *
 * @Author Vsunks.v
 * @Date 2022/8/12 19:55
 * @Blog blog.sunxiaowei.net/996.mba
 * @Description: 线程工具类
 */
public class ThreadLocalUtils {
    private static ThreadLocal<String> tl = new ThreadLocal<>();

    public static void setUserId(String userId){
        tl.set(userId);
    }

    public static String getUserId(){
        return tl.get();
    }

    public static void remove(){
        tl.remove();
    }
}
